<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/*
<span class='line'>  2</span> Copyright 2011, KISSY UI Library v1.1.5
<span class='line'>  3</span> MIT Licensed
<span class='line'>  4</span> build time: Sep 11 10:29
<span class='line'>  5</span> */</span><span class="WHIT">
<span class='line'>  6</span> </span><span class="COMM">/**
<span class='line'>  7</span>  * @author kingfo  oicuicu@gmail.com
<span class='line'>  8</span>  */</span><span class="WHIT">
<span class='line'>  9</span> </span><span class="NAME">KISSY.add</span><span class="PUNC">(</span><span class="STRN">'gallery/form/1.1/uploader/plugins/ajbridge/uploader'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">S</span><span class="PUNC">,</span><span class="NAME">flash</span><span class="PUNC">,</span><span class="NAME">A</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 10</span> 
<span class='line'> 11</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'> 12</span>      * @constructor
<span class='line'> 13</span>      * @param {String} id                                    需要注册的SWF应用ID
<span class='line'> 14</span>      * @param {Object} config                                配置项
<span class='line'> 15</span>      * @param {String} config.ds                             default server 的缩写
<span class='line'> 16</span>      * @param {String} config.dsp                            default server parameters 的缩写
<span class='line'> 17</span>      * @param {Boolean} config.btn                           启用按钮模式，默认 false
<span class='line'> 18</span>      * @param {Boolean} config.hand                          显示手型，默认 false
<span class='line'> 19</span>      */</span><span class="WHIT">
<span class='line'> 20</span> </span><span class="WHIT">    </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">Uploader</span><span class="PUNC">(</span><span class="NAME">id</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">config</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 21</span> </span><span class="WHIT">        </span><span class="NAME">config</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">config</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 22</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">flashvars</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 23</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'> 24</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'> 25</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'> 26</span> </span><span class="WHIT">		</span><span class="NAME">S.each</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="STRN">'ds'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'dsp'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'btn'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'hand'</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">key</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 27</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">key</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">config</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">flashvars</span><span class="PUNC">[</span><span class="NAME">key</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">config</span><span class="PUNC">[</span><span class="NAME">key</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 28</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 29</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'> 30</span> 
<span class='line'> 31</span> </span><span class="WHIT">        </span><span class="NAME">config.params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">config.params</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 32</span> </span><span class="WHIT">        </span><span class="NAME">config.params.flashvars</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">S.merge</span><span class="PUNC">(</span><span class="NAME">config.params.flashvars</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">flashvars</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 33</span> 
<span class='line'> 34</span> </span><span class="WHIT">		</span><span class="NAME">Uploader.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">id</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">config</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 35</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 36</span> 
<span class='line'> 37</span> </span><span class="WHIT">    </span><span class="NAME">S.extend</span><span class="PUNC">(</span><span class="NAME">Uploader</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">A</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 38</span> 
<span class='line'> 39</span> </span><span class="WHIT">    </span><span class="NAME">A.augment</span><span class="PUNC">(</span><span class="NAME">Uploader</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 40</span> </span><span class="WHIT">        </span><span class="PUNC">[</span><span class="WHIT">
<span class='line'> 41</span> </span><span class="WHIT">            </span><span class="STRN">'setFileFilters'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 42</span> </span><span class="WHIT">            </span><span class="STRN">'filter'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 43</span> </span><span class="WHIT">            </span><span class="STRN">'setAllowMultipleFiles'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 44</span> </span><span class="WHIT">            </span><span class="STRN">'multifile'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 45</span> </span><span class="WHIT">            </span><span class="STRN">'browse'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 46</span> </span><span class="WHIT">            </span><span class="STRN">'upload'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 47</span> </span><span class="WHIT">            </span><span class="STRN">'uploadAll'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 48</span> </span><span class="WHIT">            </span><span class="STRN">'cancel'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 49</span> </span><span class="WHIT">            </span><span class="STRN">'getFile'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 50</span> </span><span class="WHIT">            </span><span class="STRN">'removeFile'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 51</span> </span><span class="WHIT">            </span><span class="STRN">'lock'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 52</span> </span><span class="WHIT">            </span><span class="STRN">'unlock'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 53</span> </span><span class="WHIT">            </span><span class="STRN">'setBtnMode'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 54</span> </span><span class="WHIT">            </span><span class="STRN">'useHand'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 55</span> </span><span class="WHIT">            </span><span class="STRN">'clear'</span><span class="WHIT">
<span class='line'> 56</span> </span><span class="WHIT">        </span><span class="PUNC">]</span><span class="WHIT">
<span class='line'> 57</span> </span><span class="WHIT">        </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 58</span> 
<span class='line'> 59</span> </span><span class="WHIT">    </span><span class="NAME">Uploader.version</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'1.0.1'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 60</span> </span><span class="WHIT">    </span><span class="NAME">A.Uploader</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Uploader</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 61</span> </span><span class="WHIT">    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">A.Uploader</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 62</span> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">requires</span><span class="PUNC">:</span><span class="PUNC">[</span><span class="STRN">"flash"</span><span class="PUNC">,</span><span class="STRN">"./ajbridge"</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 63</span> </span></pre></body></html>